package top.z.work.module.system.entity.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

import java.io.Serial;

/**
 * 系统用户 表定义层。
 *
 * @author zaoangod
 * @since 2024-07-25
 */
public class SystemUserTableDef extends TableDef {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 系统用户
     */
    public static final SystemUserTableDef SYSTEM_USER = new SystemUserTableDef();

    /**
     * 密码盐
     */
    public final QueryColumn SALT = new QueryColumn(this, "salt");

    /**
     * 部门ID
     */
    public final QueryColumn DEPT_ID = new QueryColumn(this, "dept_id");

    /**
     * 手机号
     */
    public final QueryColumn MOBILE = new QueryColumn(this, "mobile");

    /**
     * 帐号状态(0.正常;1.停用)
     */
    public final QueryColumn STATUS = new QueryColumn(this, "status");

    /**
     * 创建人
     */
    public final QueryColumn CREATOR = new QueryColumn(this, "creator");

    /**
     * 登录IP地址
     */
    public final QueryColumn LOGIN_IP = new QueryColumn(this, "login_ip");

    /**
     * 更新人
     */
    public final QueryColumn UPDATER = new QueryColumn(this, "updater");

    /**
     * 数据主键
     */
    public final QueryColumn IDENTITY = new QueryColumn(this, "identity");

    /**
     * 昵称
     */
    public final QueryColumn NICKNAME = new QueryColumn(this, "nickname");

    /**
     * 用户密码
     */
    public final QueryColumn PASSWORD = new QueryColumn(this, "password");

    /**
     * 用户账号
     */
    public final QueryColumn USERNAME = new QueryColumn(this, "username");

    /**
     * 登录时间
     */
    public final QueryColumn LOGIN_TIME = new QueryColumn(this, "login_time");

    /**
     * 创建时间
     */
    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    /**
     * 更新时间
     */
    public final QueryColumn UPDATE_TIME = new QueryColumn(this, "update_time");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{IDENTITY, DEPT_ID, USERNAME, PASSWORD, NICKNAME, SALT, MOBILE, STATUS, LOGIN_IP, LOGIN_TIME, CREATE_TIME, CREATOR, UPDATE_TIME, UPDATER};

    public SystemUserTableDef() {
        super("", "system_user");
    }

}
